package com.mathmodeling.entity;

import javax.persistence.*;
import java.time.LocalDateTime;

@Entity
@Table(name = "work")
public class Work {
    
    @Id
    @Column(name = "id", length = 36)
    private String id;
    
    @Column(name = "team_id", length = 36, nullable = false)
    private String teamId;
    
    @Column(name = "contest_id", length = 36, nullable = false)
    private String contestId;
    
    @Column(name = "topic_id", length = 36, nullable = false)
    private String topicId;
    
    @Column(name = "thesis_path", length = 255, nullable = false)
    private String thesisPath;
    
    @Column(name = "support_path", length = 255, nullable = false)
    private String supportPath;
    
    @Column(name = "submitted_at")
    private LocalDateTime submittedAt;
    
    @Column(name = "auto_name", length = 200, nullable = false)
    private String autoName;
    
    // 构造函数
    public Work() {}
    
    public Work(String id, String teamId, String contestId, String topicId, 
                String thesisPath, String supportPath, String autoName) {
        this.id = id;
        this.teamId = teamId;
        this.contestId = contestId;
        this.topicId = topicId;
        this.thesisPath = thesisPath;
        this.supportPath = supportPath;
        this.autoName = autoName;
        this.submittedAt = LocalDateTime.now();
    }
    
    // Getter和Setter方法
    public String getId() {
        return id;
    }
    
    public void setId(String id) {
        this.id = id;
    }
    
    public String getTeamId() {
        return teamId;
    }
    
    public void setTeamId(String teamId) {
        this.teamId = teamId;
    }
    
    public String getContestId() {
        return contestId;
    }
    
    public void setContestId(String contestId) {
        this.contestId = contestId;
    }
    
    public String getTopicId() {
        return topicId;
    }
    
    public void setTopicId(String topicId) {
        this.topicId = topicId;
    }
    
    public String getThesisPath() {
        return thesisPath;
    }
    
    public void setThesisPath(String thesisPath) {
        this.thesisPath = thesisPath;
    }
    
    public String getSupportPath() {
        return supportPath;
    }
    
    public void setSupportPath(String supportPath) {
        this.supportPath = supportPath;
    }
    
    public LocalDateTime getSubmittedAt() {
        return submittedAt;
    }
    
    public void setSubmittedAt(LocalDateTime submittedAt) {
        this.submittedAt = submittedAt;
    }
    
    public String getAutoName() {
        return autoName;
    }
    
    public void setAutoName(String autoName) {
        this.autoName = autoName;
    }
} 